<?php
namespace app\api\controller;

use app\BaseController;
use app\api\model\NewsModel;
use think\Db;

class News extends BaseController {

	
	
	
	/**
	 * 通过ID得到用户信息
	 */
	function sliders()
	{
		$category = $this->getParam("category");
		
		if(!$this->pvalidate(["category"=>$category], ["category"], ["req|num"], ["类别"])){
			return;
		}
		
		$newsModel = new NewsModel();
		$sliderList = $newsModel->findSliderList($category);	
		
		echo json_encode(array("success"=>1,"content"=>_unsetNull($sliderList),"code"=>200,"msg"=>"ok"),true);
	}	
	
	
	
	
}
